package com.pro.utils;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;

public class ExcelUtils {

    //字符串转时间
    public static Date transString(String myDate) throws ParseException {
        SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
        Date date = format.parse(myDate);
        return date;
    }
    //时间转字符串
    public static String transDate(Date myDate){
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
        String format = sdf.format(myDate);
        return format;
    }

    //转换int
    public static Integer StrisInt(String str){
        Integer round = (int) Math.round(Double.parseDouble(str));
        return round;
    }

}
